package com.hamster.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hamster.crm.pojo.Leverage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Tarry
 * @create 2019/12/19 10:47
 */
@Mapper
@Repository
public interface LeverageMapper extends BaseMapper<Leverage> {

    /**
     * 查询所有杠杆计划的记录
     * @return
     */
    @Select("select * from leverage where del = 0")
    List<Leverage> selectAll();

    /**
     * 标记删除
     * @param id
     */
    @Update("update leverage set del = 1 where id = #{id}")
    void deleteTag(String id);
}
